﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIG.InputModel.Front.Emails
{
    public class ConsultationIM
    {
        [Display(Name = "企业名称 *", Prompt = "企业名称")]
        [Required(ErrorMessage = "请输入企业名称")]
        public string CompanyName { get; set; }

        [Display(Name = "企业主营业务 *", Prompt = "企业主营业务")]
        [DataType(DataType.MultilineText)]
        [Required(ErrorMessage = "请输入企业主营业务")]
        public string CompanyIntro { get; set; }


        [Display(Name = "联系人 *", Prompt = "联系人")]
        [Required(ErrorMessage = "请输入联系人姓名")]
        public string ContactMan { get; set; }

        [Display(Name = "电话", Prompt = "电话")]
        public string Phone { get; set; }

        [Display(Name = "手机*", Prompt = "手机")]
        [Required(ErrorMessage = "请输入手机号")]
        // [Mobile(ErrorMessage = "手机号格式不正确")]     //自定义验证
        [RegularExpression(@"^(1[3,5,8,7]{1}[\d]{9})|(((400)-(\d{3})-(\d{4}))|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})" +
            @"|(\d{4}|\d{3})-(\d{3,7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)$", ErrorMessage = "手机号码格式不正确")]
        public string Mobile { get; set; }

        [Display(Name = "QQ", Prompt = "QQ")]
        public string OICQ { get; set; }

        //[DataType(DataType.EmailAddress)]       4.5才有效  
        [EmailAddress(ErrorMessage = "邮箱格式不正确")]     //自定义验证
        [Display(Name = "E-mail *", Prompt = "E-mail")]
        [Required(ErrorMessage = "请输入您的E-mail")]
        public string Email { get; set; }


        [Display(Name = "公司网站", Prompt = "公司网站")]
        [Url(ErrorMessage = "网址格式不正确")]
        public string Homepage { get; set; }


        [Display(Name = "专利 *", Prompt = "专利")]
        [Required(ErrorMessage = "请输入专利数量")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int Patent { get; set; }

        [Display(Name = "实用新型 *", Prompt = "实用新型")]
        [Required(ErrorMessage = "请输入实用新型数量")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int Newtype { get; set; }

        [Display(Name = "外观设计 *", Prompt = "外观设计")]
        [Required(ErrorMessage = "请输入外观设计数量")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int Design { get; set; }

        [Display(Name = "软件著作权 *", Prompt = "软件著作权")]
        [Required(ErrorMessage = "请输入软件著作权数量")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int Software { get; set; }

        [Display(Name = "集成电路布图设计专有权 *", Prompt = "集成电路布图设计专有权")]
        [Required(ErrorMessage = "请输入集成电路布图设计专有权数量")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int Integrate { get; set; }

        [Display(Name = "植物新品种 *", Prompt = "植物新品种")]
        [Required(ErrorMessage = "请输入植物新品种数量")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int Plant { get; set; }

        [Display(Name = "其他", Prompt = "其他")]
        public string Orther { get; set; }




        [Display(Name = "职工总数（人） *", Prompt = "职工总数（人）")]
        [Required(ErrorMessage = "请输入职工总数")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int WorkerCount { get; set; }

        [Display(Name = "大专以上学历科技人员数（人）", Prompt = "大专以上学历科技人员数（人）")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int? BrainpowerCount { get; set; }

        [Display(Name = "从事研究开发人员数（人）", Prompt = "从事研究开发人员数（人）")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int? DeveloperCount { get; set; }

        [Display(Name = "留学归国人员数（人）", Prompt = "留学归国人员数（人）")]
        [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "格式不正确")]
        public int? OverseasCount { get; set; }



        [Display(Name = "第一年 *", Prompt = "第一年")]
        [Required(ErrorMessage = "请输入第一年销售收入")]
        [RegularExpression(@"^(d*.d{0,2}|d+).*$", ErrorMessage = "格式不正确")]
        public decimal SaleOne { get; set; }

        [Display(Name = "第二年 *", Prompt = "第二年")]
        [Required(ErrorMessage = "请输入第二年销售收入")]
        [RegularExpression(@"^(d*.d{0,2}|d+).*$", ErrorMessage = "格式不正确")]
        public decimal SaleTwo { get; set; }

        [Display(Name = "第三年 *", Prompt = "第三年")]
        [Required(ErrorMessage = "请输入第三年销售收入")]
        [RegularExpression(@"^(d*.d{0,2}|d+).*$", ErrorMessage = "格式不正确")]
        public decimal SaleThree { get; set; }


        [Display(Name = "第一年 *", Prompt = "第一年")]
        [Required(ErrorMessage = "请输入第一年总资产")]
        [RegularExpression(@"^(d*.d{0,2}|d+).*$", ErrorMessage = "格式不正确")]
        public decimal AssetsOne { get; set; }

        [Display(Name = "第二年 *", Prompt = "第二年")]
        [Required(ErrorMessage = "请输入第二年总资产")]
        [RegularExpression(@"^(d*.d{0,2}|d+).*$", ErrorMessage = "格式不正确")]
        public decimal AssetsTwo { get; set; }

        [Display(Name = "第三年 *", Prompt = "第三年")]
        [Required(ErrorMessage = "请输入第三年总资产")]
        [RegularExpression(@"^(d*.d{0,2}|d+).*$", ErrorMessage = "格式不正确")]
        public decimal AssetsThree { get; set; }


        [Display(Name = "主营产品（服务）所属技术领域")]
        [Required(ErrorMessage = "请选择所属领域")]
        public string[] Areas { get; set; }

        public IList<string> AvailableAreas { get; set; }
    }
}
